#include <iostream>
#include <math>

using namespace std;

class TreeNode
{
public:
    int value;
    TreeNode* lchid, rchild;
};

int MinNode(TreeNode& b)
{
    if (b == nullptr)
    {
        return 256;
    }

    return min(b->value, min(MinNode(b.lchid), MinNode(b.rchild)));
}

void Copy(TreeNode* b1, TreeNode* b2)
{
    if (b1 == nullptr)
    {
        b2 = nullptr;
        return;
    }

    b2 = new TreeNode();
    b2->value = b1->value;
    Copy(b1->lchid, b2->lchid);
    Copy(b1->rchild, b2->rchild);
}